import request from '@/utils/index'

/**
*获取评论回复的请求
*/
export const getCommentList = params => {
  return request({
    method: 'GET',
    url: '/app/v1_0/comments',
    params
  })
}

/**
*点赞评论或评论回复的请求
*/
export const commentLike = data => {
  return request({
    method: 'POST',
    url: '/app/v1_0/comment/likings',
    data
  })
}

/**
*取消评论或评论回复的点赞请求
*/
export const cancelCommentLike = target => {
  return request({
    method: 'DELETE',
    url: `/app/v1_0/comment/likings/${target}`
  })
}
